<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            width: 100px;
            height: 100px;
            background-color: red;
            /* transition: all 2s; */
        }

        .box:hover {
            /* transform: rotate(45deg); */
            /* animation: ratate 0.1s cubic-bezier(0.34, 0, 0.84, 1) infinite; */

        }

        @media screen and (min-width:400px) {
            .box {
                width: 200px;
                height: 200px;
            }
        }

        @keyframes ratate {
            0% {
                transform: rotate(666turn);
            }

            100% {
                transform: rotateZ(666turn);
            }
        }
    </style>
</head>

<body>
    <div class="box"></div>
</body>

</html>